#pragma once

#include "Includes.h"
#include "Surface.h"

#define SAFE_DELETE( x )			if( x ){ delete x; x = NULL; }
#define SAFE_DELETE_ARRAY( x )      if( x ){ delete [] x; x = NULL; }

enum
{
	FF_NONE,
	FF_ITALIC		= 0x001,
	FF_UNDERLINE	= 0x002,
	FF_STRIKEOUT	= 0x004,
	FF_SYMBOL		= 0x008,
	FF_ANTIALIAS	= 0x010,
	FF_GAUSSIANBLUR	= 0x020,
	FF_ROTARY		= 0x040,
	FF_DROPSHADOW	= 0x080,
	FF_ADDITIVE		= 0x100,
	FF_OUTLINE		= 0x200,
	FF_CUSTOM		= 0x400,
};

enum
{
	FA_CenterH	= 0x1,
	FA_CenterW	= 0x2,
	FA_Left		= 0x4,
	FA_Right	= 0x8,
};

class Font
{
public:	
	static Font* BuildFont( const char* szFace, int iSize, int iWeight, int iFlags );
	void PrintString( int x, int y, int r, int g, int b, int a, DWORD_PTR dwAlign, const char* szText, ... );
	int GetTextHeight() { return m_size; }
private:
	unsigned long	m_id;
	int				m_size;
};

extern Font* g_pFont;
extern Font* g_pWeaponFont;